import java.awt.Color;
import java.awt.Graphics;
import javax.swing.AbstractButton;
import javax.swing.JComponent;
import javax.swing.plaf.basic.BasicButtonUI;

/**
 * @author Zero
 */
public class ButtonUI extends BasicButtonUI {

    @Override
    public void paint(Graphics g, JComponent c) {
        g.setColor(new Color(255, 0, 0, 150));
        g.fillRoundRect(3, 3, c.getWidth() - 6, c.getHeight() - 6, 10, 10);
        super.paint(g, c);
    }

    @Override
    protected void paintButtonPressed(Graphics g, AbstractButton b) {
        g.setColor(new Color(255, 150, 200, 150));
        g.fillRoundRect(3, 3, b.getWidth() - 6, b.getHeight() - 6, 10, 10);
        super.paintButtonPressed(g, b);
    }
}
